import fetch from '@/utils/request'
import { addParams } from './common.js'

// 	限制名单列表(分页)
export function getRestrictedList(params, data) {
  const uploadParams = addParams(params)
  return fetch({
    // baseURL: 'https://www.easy-mock.com/mock/5ab9d83305896018293276bf/bt',
    url: '/api/allinpay.balance.restricted/restricted/getRestrictedList',
    method: 'post',
    params: uploadParams,
    data: data
  })
}

// 5. 查询限制名单表查询(操作记录)
export function queryRestrictedAll(params, data) {
  const uploadParams = addParams(params)
  return fetch({
    // baseURL: 'https://www.easy-mock.com/mock/5ab9d83305896018293276bf/bt',
    url: '/api/allinpay.balance.restricted/restricted/queryRestrictedAll',
    method: 'post',
    params: uploadParams,
    data: data
  })
}

// 1. 限制名单新增接口(入库)
export function saveRestricted(params, data) {
  const uploadParams = addParams(params)
  return fetch({
    // baseURL: 'https://www.easy-mock.com/mock/5ab9d83305896018293276bf/bt',
    url: '/api/allinpay.balance.restricted/restricted/saveRestricted',
    method: 'post',
    params: uploadParams,
    data: data
  })
}

// 3.限制名单表修改接口(出库)
export function updateRestricted(params, data) {
  const uploadParams = addParams(params)
  return fetch({
    // baseURL: 'https://www.easy-mock.com/mock/5ab9d83305896018293276bf/bt',
    url: '/api/allinpay.balance.restricted/restricted/updateRestricted',
    method: 'post',
    params: uploadParams,
    data: data
  })
}

// // 2.限制名单表删除接口(出库)
// export function deleteRestricted(params, data) {
//   const uploadParams = addParams(params)
//   return fetch({
//     // baseURL: 'https://www.easy-mock.com/mock/5ab9d83305896018293276bf/bt',
//     url: '/api/allinpay.balance.restricted/restricted/deleteRestricted',
//     method: 'post',
//     params: uploadParams,
//     data: data
//   })
// }

